/**
 * Created by DELL on 2017/9/1.
 */

import React, {Component} from "react";
import {
    AppRegistry,
    StyleSheet,
    View,
    Text,
    TextInput,
    Image,
    ToolbarAndroid,
    TouchableOpacity

} from "react-native";


export default class EditView extends Component {
    constructor(props) {
        super(props);
        this.state = {text: ''};
    }


    render() {

        return (
            <View style={LoginStyles.TextInputView}>
                <TextInput style={LoginStyles.TextInput}
                           placeholder={this.props.name}
                           onChangeText={
                               (text) => {
                                   this.setState({text});
                                   this.props.onChangeText(text);
                               }
                           }
                />
            </View>

        );

    }
}


const LoginStyles = StyleSheet.create({
    TextInputView: {
        marginTop: 10,
        height: 50,
        backgroundColor: '#ffffff',
        borderRadius: 5,
        borderWidth: 0.3,
        borderColor: '#000000',
        flexDirection: 'column',
        justifyContent: 'center',
    },

    TextInput: {
        backgroundColor: '#ffffff',
        height: 45,
        margin: 18,
    },
});